package com.fengli.task.dao;

import com.fengli.task.entity.WeekSummaryEntity;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Description:
 * @Author: fengli
 * @Date 5/11/19 9:30 PM
 */
public interface WeekSummaryMapper {
    // 增

    /**
     * 添加周总结
     * @param weekSummaryEntity
     * @return 周总结的id
     */
    @Select("insert into week_summary(id,year,n,user_id,content) values(#{id},#{year},#{userId},#{content})")
    String addWeekSummary(WeekSummaryEntity weekSummaryEntity);

    // 删

    // 改

    /**
     * 更新周总结
     * @param weekSummaryEntity
     * @return
     */
    String updateWeekSummary(@Param("weekSummary") WeekSummaryEntity weekSummaryEntity);

    // 查
    /**
     * 究极查询方法，可能查询出来的结果为一个，也可能为多个
     * @param weekSummaryEntity
     */
    List<WeekSummaryEntity> queryWeekSummaryList(@Param("weekSummary") WeekSummaryEntity weekSummaryEntity);
}
